<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Magick++ API</title>
<link rel="stylesheet" href="magick.css" type="text/css" />
</head>
<body>
<div class="doc-section">
<P ALIGN=CENTER><IMG SRC="Magick++.png" NAME="Graphic1" ALIGN=BOTTOM WIDTH=464 HEIGHT=134 BORDER=0></P>
<h1>ImageMagick Magick++ API</h1>
<P>Magick++ is the object-oriented C++ API to the <A HREF="../index.html">ImageMagick</A>
image-processing library, the most comprehensive open-source image
processing package available. Read the latest <A HREF="../index.html">NEWS</A>
and <A HREF="http://magick.imagemagick.org/script/changelog.php">ChangeLog</A> for Magick++. 
</P>
<P><IMG SRC="logo.png" NAME="Graphic2" ALIGN=RIGHT WIDTH=85 HEIGHT=88 BORDER=0>Magick++
supports an object model which is inspired by <A HREF="../script/perl-magick.php">PerlMagick</A>.
Images support implicit reference counting so that copy constructors
and assignment incur almost no cost. The cost of actually copying an
image (if necessary) is done just before modification and this copy
is managed automagically by Magick++. De-referenced copies are
automagically deleted. The image objects support value (rather than
pointer) semantics so it is trivial to support multiple generations
of an image in memory at one time. 
</P>
<P>Magick++ provides integrated support for the <A HREF="http://www.sgi.com/tech/stl/">Standard
Template Library</A> (STL) so that the powerful containers available
(e.g. <A HREF="http://www.sgi.com/tech/stl/Deque.html">deque</A>,
<A HREF="http://www.sgi.com/tech/stl/Vector.html">vector</A>, <A HREF="http://www.sgi.com/tech/stl/List.html">list</A>,
and <A HREF="http://www.sgi.com/tech/stl/Map.html">map</A>)  can
be used to write programs similar to those possible with PERL &amp;
PerlMagick. STL-compatible template versions of ImageMagick's
list-style operations are provided so that operations may be
performed on multiple images stored in STL containers. 
</P>
<H3>Documentation</H3>
<P>Detailed <A HREF="Documentation.html">documentation</A> is
provided for all Magick++ classes, class methods, and template
functions which comprise the API.  See a <a href="tutorial/Magick++_tutorial.pdf" target="<?php echo rand()?>">  Gentle Introduction to Magick++</a> for an introductory tutorial to Magick++.  We include the <a href="tutorial/Magick++_tutorial.odt" target="<?php echo rand()?>">source</a> if you want to correct, enhance, or expand the tutorial.</p>
</P>
<H3>Obtaining Magick++</H3>
<P>Magick++ is included as part of <A HREF="../index.html">ImageMagick</A>
source releases and may be retrieved via <A HREF="../script/download.php">ftp</A>
or <A HREF="https://github.com/ImageMagick">Github</A>.
</P>
<H3>Installation</H3>
<P>Once you have the Magick++ sources available, follow these detailed
<A HREF="Install.html">installation instructions</A> for UNIX and
Windows. 
</P>
<P><B><FONT SIZE=4>Usage</FONT></B> 
</P>
<P>A helper script named <I>Magick++-config</I> is installed
under Unix which assists with recalling compilation options required
to compile and link programs which use Magick++. For example, the
following command will compile and link the source file <I>example.cpp</I>
to produce the executable <I>example</I> (notice that quotes are
backward quotes): 
</P>
<BLOCKQUOTE><TT><FONT SIZE=2>c++ -O2 -o example example.cpp
`Magick++-config --cppflags --cxxflags --ldflags --libs`</FONT></TT></BLOCKQUOTE>
<P>Windows users may get started by manually editing a project file
for one of the Magick++ demo programs. 
</P>
<P><B>Be sure to initialize the ImageMagick library prior to using the
Magick++ library</B>. This initialization is performed by passing the
path to the ImageMagick DLLs (assumed to be in the same directory
as your program) to the InitializeMagick() function call. This is
commonly performed by providing the path to your program (argv[0]) as
shown in the following example: 
</P>
<BLOCKQUOTE><TT><FONT COLOR="#663366">int main( ssize_t /*argc*/, char **
argv)</FONT></TT> <BR><TT><FONT COLOR="#663366">{</FONT></TT> <BR><TT><FONT COLOR="#663366"> 
InitializeMagick(*argv);</FONT></TT></BLOCKQUOTE>
</P>
<H3>Reporting Bugs</H3>
<P>Please report any bugs via the
<A HREF="http://www.imagemagick.org/discourse-server/viewforum.php?f=3">Magick++ bug tracking forum</A>.
Questions regarding usage should be directed to 
<A HREF="http://www.imagemagick.org/discourse-server/viewforum.php?f=1">Magick++ discussion forum</A>.
</P>
<H3>Related Packages</H3>
<P>Users who are interested in displaying their images at video game
rates on a wide number of platforms and graphic environments (e.g.
Windows, X11, BeOS, and Linux/CGI) may want to try PtcMagick,
which provides a simple interface between Magick++ and <A HREF="http://www.gaffer.org/ptc/">OpenPTC</A>.
</P>
</ul>
</BODY>
</HTML>
